﻿package com.hongguan.oms.service.grid;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.hongguan.oms.service.BaseService;

/**
 * GridSchoolInfo Service
 * 
 * @author 
 * 
 */
@Service
public class GridSchoolInfoService extends BaseService{

	public GridSchoolInfoService() {
		super();
		namespace = "GRID_SCHOOL_INFO";
	}
	public List searchSchool(Map param){
		return (List)this.getSqlMapClientTemplate().queryForList(this.getStatementName("school_search"),param);
	}
	public List searchSchoolById(Map param){
		return (List)this.getSqlMapClientTemplate().queryForList(this.getStatementName("school_search_by_id"),param);
	}
	public long searchSchoolCount(Map param){
		return (Long)this.getSqlMapClientTemplate().queryForObject(this.getStatementName("school_search_count"),param);
	}
	public boolean isNameSame(Map param){
		boolean flag=false;
		long num = (Long)this.getSqlMapClientTemplate().queryForObject(this.getStatementName("is_school_name_same"),param);
		if(num>0){
			flag=true;
		}
		return flag;
	}
	public long addSchool(Map param){
		return (Long)this.getSqlMapClientTemplate().insert(this.getStatementName("school_add"),param);
	}
	public void modifySchool(Map param){
		this.getSqlMapClientTemplate().update(this.getStatementName("school_modify"),param);
	}
	public void deleteSchool(Map param){
		this.getSqlMapClientTemplate().delete(this.getStatementName("school_delete"),param);
	}
}

